<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="./styles/base.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="./jss/jquery.js"></script>
        <title>投其折扣</title>
    </head>
    <body>
        <div id="h">
            <div class="h_c"><a href="./"><img src="./images/logo.png" alt="投其首页"/></a></div>
        </div>
        <div id="m">
            <div class="m_c w1200">
                <div class="m_block">
                    <div class="b_img"><a href="<{$data['itemurl']}>"><img src="<{$data['pic_url']}>"/></a></div>
                    <div class="b_info">
                        <p><a class="b2_title" href="<{$data['itemurl']}>"><{$data['title']}></a></p>
                        <p><span>原价:</span>￥<{$data['price']}></p>
                        <p><span>返利:</span>￥<{$data['commission']}></p>
                        <p><span>已售:</span><{$data['volume']}>件</p>
                        <div class="b_zhe">发现隐藏折扣<span><{$data['commission_rate']}>%</span></div>
                    </div>
                    <div class="clear"></div>
                    <div class="b_input b2_input">
                        <div class="b_msg">
                            <{if isset($msg)}><span class="e">E</span><span class="msg"><{$msg}></span><{/if}>&nbsp;
                        </div>
                        <label for="tbuser">输入您的淘宝会员名:</label>
                        <input type="hidden" name="itemid" id="itemid" value="<{$data['num_iid']}>"/>
                        <input id="tbuser" type="text" name="tbusername"/>
                    </div>
                    <div class="b2_btn"><input id="click_s" type="submit" value="生成折扣链接"/></div>
                </div>
            </div>
        </div>
        <div class="line"></div>
        <div id="f">
            <div class="f_c w1200">2012 Power By <a href="http://k1029.com" target="_blank">k1029.com</a></div>
        </div>
        <script type="text/javascript">
            $("#click_s").click(function(){
                $.ajax({
                    type: "post",
                    url: "./index.php?a=k_step2",
                    data:{
                        'tbusername':$("#tbuser").val(),
                        'itemid':$("#itemid").val()
                    },
                    beforeSend: function(XMLHttpRequest){
                        //ShowLoading();
                        $(".b_msg").html("正在生成,稍等...");
                    },
                    success: function(data){
                        $(".b_msg").html(data);
                    },
                    complete: function(XMLHttpRequest, textStatus){
                        //HideLoading();
                    }
                });
            });
        </script>
    </body>
</html>
